package singleton.demo03;

/**
 * 懒汉式01, 线程不安全, 即无法保证只创建了一个对象
 */
public class Singleton03 {

    private static Singleton03 instance;

    private Singleton03(){};

    public static Singleton03 getInstance(){
        if (instance == null){
            instance = new Singleton03();
        }
        return instance;
    }
}
